﻿$(document).ready(function () {
    //Tabs function
    $("#tabs").tabs();

    //Timeline
    $('#gallerya a.timeline').lightBox({ fixedNavigation: true });

    $(".timeline").hover(function () {
        var id = $(this).attr('id').split('-')[1];
        var item = List["info-" + id];

        $("#image-container").html('<a href="' + item.FullPath + '" title="' + item.PictureData + '"><img src="' + item.ThumbPath + '" /></a><br /><strong>' + item.PictureData + '</strong>');

        /* We have to have it here as well since it'll deregister the event handler when we fill the image-container with new content */
        $('#gallerya a .timeline').lightBox({ fixedNavigation: true });
    });

    $("#form-text-textarea").wysiwyg({
        resizeOptions: {}
    });

    $.datepicker.setDefaults({ dateFormat: 'mm/dd/yy' });
    $('#form-birthdate').datepicker();

}); 